package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:50:22
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceServerBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.WorkspaceServer workspaceServer;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspaceServer);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceServerDAO.Id);
		
																																																										
				
																
		mappedDaoFields.put("workspaceId",com.ourteam.workspace.dao.IWorkspaceServerDAO.WorkspaceId);
		
																																																						
				
																				
		mappedDaoFields.put("serverName",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerName);
		
																																																		
				
																								
		mappedDaoFields.put("serverType",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerType);
		
																																														
				
																												
		mappedDaoFields.put("serverLogo",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerLogo);
		
																																										
				
																																
		mappedDaoFields.put("startCmd",com.ourteam.workspace.dao.IWorkspaceServerDAO.StartCmd);
		
																																						
				
																																				
		mappedDaoFields.put("stopCmd",com.ourteam.workspace.dao.IWorkspaceServerDAO.StopCmd);
		
																																		
				
																																								
		mappedDaoFields.put("restartCmd",com.ourteam.workspace.dao.IWorkspaceServerDAO.RestartCmd);
		
																														
				
																																												
		mappedDaoFields.put("serverLocation",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerLocation);
		
																										
				
																																																
		mappedDaoFields.put("serverUser",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerUser);
		
																						
				
																																																				
		mappedDaoFields.put("serverPassword",com.ourteam.workspace.dao.IWorkspaceServerDAO.ServerPassword);
		
																		
				
																																																								
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceServerDAO.Status);
		
														
				
																																																												
		mappedDaoFields.put("remarks",com.ourteam.workspace.dao.IWorkspaceServerDAO.Remarks);
		
										
				
																																																																
		mappedDaoFields.put("defaultServer",com.ourteam.workspace.dao.IWorkspaceServerDAO.DefaultServer);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceServerBean() {
		super();
	    		
		this.workspaceServer = new com.ourteam.workspace.dao.WorkspaceServer();
                
	}
	
		
	public WorkspaceServerBean(com.ourteam.workspace.dao.WorkspaceServer workspaceServer) {
		super();
	
		this.workspaceServer = workspaceServer;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.WorkspaceServer convertToWorkspaceServer(){
		return this.workspaceServer;
	}
	
	public com.ourteam.workspace.dao.WorkspaceServer convertTo(){
		return this.workspaceServer;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspaceServer.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspaceServer.setId(id);
	}
		
																													
		
		
					
			
		
	/**
	 * Get workspaceId
	 * 
	 * @return long
	 */
	public long getWorkspaceId(){
		return (long) this.workspaceServer.getWorkspaceId();
	}
	
	/**
	 * Set workspaceId
	 * 
	 * @parameter long
	 */
	public void setWorkspaceId(long workspaceId){
		
		this.workspaceServer.setWorkspaceId(workspaceId);
	}
		
																											
		
		
							
			
		
	/**
	 * Get serverName
	 * 
	 * @return String
	 */
	public String getServerName(){
		return (String) this.workspaceServer.getServerName();
	}
	
	/**
	 * Set serverName
	 * 
	 * @parameter String
	 */
	public void setServerName(String serverName){
		
		this.workspaceServer.setServerName(serverName);
	}
		
																									
		
		
									
			
		
	/**
	 * Get serverType
	 * 
	 * @return String
	 */
	public String getServerType(){
		return (String) this.workspaceServer.getServerType();
	}
	
	/**
	 * Set serverType
	 * 
	 * @parameter String
	 */
	public void setServerType(String serverType){
		
		this.workspaceServer.setServerType(serverType);
	}
		
																							
		
		
											
			
		
	/**
	 * Get serverLogo
	 * 
	 * @return String
	 */
	public String getServerLogo(){
		return (String) this.workspaceServer.getServerLogo();
	}
	
	/**
	 * Set serverLogo
	 * 
	 * @parameter String
	 */
	public void setServerLogo(String serverLogo){
		
		this.workspaceServer.setServerLogo(serverLogo);
	}
		
																					
		
		
													
			
		
	/**
	 * Get startCmd
	 * 
	 * @return String
	 */
	public String getStartCmd(){
		return (String) this.workspaceServer.getStartCmd();
	}
	
	/**
	 * Set startCmd
	 * 
	 * @parameter String
	 */
	public void setStartCmd(String startCmd){
		
		this.workspaceServer.setStartCmd(startCmd);
	}
		
																			
		
		
															
			
		
	/**
	 * Get stopCmd
	 * 
	 * @return String
	 */
	public String getStopCmd(){
		return (String) this.workspaceServer.getStopCmd();
	}
	
	/**
	 * Set stopCmd
	 * 
	 * @parameter String
	 */
	public void setStopCmd(String stopCmd){
		
		this.workspaceServer.setStopCmd(stopCmd);
	}
		
																	
		
		
																	
			
		
	/**
	 * Get restartCmd
	 * 
	 * @return String
	 */
	public String getRestartCmd(){
		return (String) this.workspaceServer.getRestartCmd();
	}
	
	/**
	 * Set restartCmd
	 * 
	 * @parameter String
	 */
	public void setRestartCmd(String restartCmd){
		
		this.workspaceServer.setRestartCmd(restartCmd);
	}
		
															
		
		
																			
			
		
	/**
	 * Get serverLocation
	 * 
	 * @return String
	 */
	public String getServerLocation(){
		return (String) this.workspaceServer.getServerLocation();
	}
	
	/**
	 * Set serverLocation
	 * 
	 * @parameter String
	 */
	public void setServerLocation(String serverLocation){
		
		this.workspaceServer.setServerLocation(serverLocation);
	}
		
													
		
		
																					
			
		
	/**
	 * Get serverUser
	 * 
	 * @return String
	 */
	public String getServerUser(){
		return (String) this.workspaceServer.getServerUser();
	}
	
	/**
	 * Set serverUser
	 * 
	 * @parameter String
	 */
	public void setServerUser(String serverUser){
		
		this.workspaceServer.setServerUser(serverUser);
	}
		
											
		
		
																							
			
		
	/**
	 * Get serverPassword
	 * 
	 * @return String
	 */
	public String getServerPassword(){
		return (String) this.workspaceServer.getServerPassword();
	}
	
	/**
	 * Set serverPassword
	 * 
	 * @parameter String
	 */
	public void setServerPassword(String serverPassword){
		
		this.workspaceServer.setServerPassword(serverPassword);
	}
		
									
		
		
																									
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspaceServer.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspaceServer.setStatus(status);
	}
		
							
		
		
																											
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.workspaceServer.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.workspaceServer.setRemarks(remarks);
	}
		
					
		
		
																													
			
		
	/**
	 * Get defaultServer
	 * 
	 * @return String
	 */
	public String getDefaultServer(){
		return (String) this.workspaceServer.getDefaultServer();
	}
	
	/**
	 * Set defaultServer
	 * 
	 * @parameter String
	 */
	public void setDefaultServer(String defaultServer){
		
		this.workspaceServer.setDefaultServer(defaultServer);
	}
		
			
		
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceServerBean) == false) {
            return false;
        } // end if

        WorkspaceServerBean other = (WorkspaceServerBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.WorkspaceServer tempWorkspaceServer = other.convertToWorkspaceServer();
        
        if(tempWorkspaceServer == null || this.workspaceServer == null){
        	isEqual = false;
        }
        else if(tempWorkspaceServer == this.workspaceServer || tempWorkspaceServer.equals(this.workspaceServer) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceServerBean[] toArray(com.ourteam.workspace.dao.WorkspaceServer[] aWorkspaceServers){
		
		return toArray(aWorkspaceServers,null);
	}
	
	public static WorkspaceServerBean[] toArray(com.ourteam.workspace.dao.WorkspaceServer[] aWorkspaceServers , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaceServers)){
		 	return new WorkspaceServerBean[0];
		 }
		 
		 int length = aWorkspaceServers.length;
		 
		 WorkspaceServerBean[] beans = new WorkspaceServerBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceServerBean(aWorkspaceServers[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaceServers[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}